This invention relates to a speech analyzing and synthesizing apparatus for analyzing a speech signal and coding it by reducing the average code length for the convenience of data transmission and storage.
A large quantity of data is generally required to express a speech signal but speech signals are experimentally known to exhibit a very significant correlation between successive samples. It is because its spectrum distribution has large deviations with high-energy vowels distributed in a low-frequency region of less than 1 kHz and energy associated with consonants distributed in a high-frequency region of above 3 kHz and up to 5-6 kHz. If the sampling frequency is chosen sufficiently high so that consonants can be accurately reproduced, there is oversampling with respect to the high-energy low-frequency vowel components and this means that correlations between adjacent sampled values become high.
In other words, speech signals usually include redundancy to a considerable degree. It is therefore desirable to compress them properly such that they can be transmitted with higher efficiency and stored even in a low-capacity memory device.
Methods of coding speech signals can be roughly classified into the waveform coding method and the method of coding in the frequency space. According to the waveform coding method, a fixed number of coded data is outputted, for example, per sample. According to the method of coding in the frequency space, a fixed number of coded data is outputted, for example, per frame. When the waveform coding method is used, it is clearly more advantageous, from the point of view of reducing the total amount of data to be stored, to use a variable-length coding method by outputting a large amount of data where changes in the waveform are large and unpredictable and a smaller amount of data where waveform changes are small and easily predictable. A similar statement is applicable also regarding the method of coding in the frequency space.
Since speech signals have a very high correlation between successive samples and the sample distributions are limited in a narrow range, it is advantageous to consider their differentials instead of directly coding the sampled signal values because the range of quantization can be reduced by considering the differentials. Principles of this technology are disclosed, for example, in "Digital Coding of Speech Waveforms: PCM, DPCM and DM Quantizers" by N. S. Jayant published in the Proceedings of IEEE, Vol 62, No. 5, pp. 611-632 (1974).
Japanese Patent Application entitled Speech Analyzing and Synthesizing Apparatus filed Jan. 16, 1987 and assigned to the present assignee has disclosed a speech analyzing and synthesizing apparatus for reducing the average code length by outputting codes of variable length with a particular one of analyzed codes from an inputted speech signal used as a marker code and by varying the amount of data on the results of coding by a simple operation according to the change in the inputted speech signal. This apparatus is comprised of a differential detection means for detecting differentials between pairs of mutually adjacent sampled speech signals, a judging means for judging whether or not a differential detected by the differential detection means is within a specified range (quantization range, or coding range) inside which it can be coded by a specified number of codes and a coding means for coding a detected differential within this range and, if this detected differential is outside this range, calculating what will hereinafter be referred to as the repetition number of this range (an integer indicative of how many times this range must be extended such that the detected differential value can come within this extended range) for expressing its differential and coding it by a code array inclusive of a marker code representing this repetition number. With an apparatus thus structured, coding is effected within a fixed number of codes if the differential is within the quantization range and with a code array including a marker code representing the repetition number of the range. If the differential is not within the range, however, a marker code expressing the repetition number of the range is outputted. Thus, if it is attempted to reduce the quantization error of differential by reducing the range when the amount of data (bit length) of a specified number of codes is small, there is a significant increase in situations where the differential is not within the range and a code array including a marker code is outputted for each such situation. This means that the average code length cannot be reduced.